/**
 * 
 *//*
package com.cipe.cmrs.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cipe.cmrs.model.Paymentmethod;
import com.cipe.cmrs.model.User;
import com.cipe.cmrs.util.DateUtil;

*//**
 * @author Incepio
 * 
 *//*
@Service
@Transactional
public class PaymentmethodService extends BaseService<Paymentmethod> {

	@Autowired
	private UserService	userService;

	public Paymentmethod savePaymentmethod(Paymentmethod paymentmethod, Integer userId) {
		if (paymentmethod != null) {
			User user = userService.findById(userId);
			Paymentmethod dbPaymentmethod = findById(paymentmethod.getId());
			if (dbPaymentmethod == null) {
				dbPaymentmethod = new Paymentmethod();
				dbPaymentmethod.setCreatedBy(user);
				dbPaymentmethod.setCreationDate(DateUtil.getCurrentDate());
			}
			dbPaymentmethod.setUpdatedBy(user);
			dbPaymentmethod.setUpdationDate(DateUtil.getCurrentDate());
			return merge(dbPaymentmethod);
		}
		return null;
	}
}
*/